lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

sub(;..;)-{-match-..-}-(sub).sublime-snippet (360B)


      1 <snippet>
      2 	<content><![CDATA[sub(/${1:pattern}/) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:match}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }]]></content>
      3 	<tabTrigger>sub</tabTrigger>
      4 	<scope>source.ruby</scope>
      5 	<description>sub(/../) { |match| .. }</description>
      6 </snippet>